﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace PhoneApp2
{
    public partial class GameList : PhoneApplicationPage
    {
        public GameList()
        {
            InitializeComponent();
            Loaded += new RoutedEventHandler(Page_Loaded);
        }

        private void Page_Loaded(object sender, RoutedEventArgs e) {
            List<GameAbstract> remoteGameList = new List<GameAbstract>();
            for (int i = 0; i < 10; i++) {
                remoteGameList.Add(new GameAbstract("Images/icon1.png",i.ToString(),"Ready"));
            }
            RemoteGameList.ItemsSource = remoteGameList;
        }

        private void ListBoxItem_Tap(object sender, GestureEventArgs e)
        {
            NavigationService.Navigate(new Uri("/GamePlay.xaml", UriKind.Relative));
        }
    }
}